home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / c / sozobon / sozlib15.zoo / sozdistr / include / xdlibs / stddef.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-28  |  1.8 KB  |  92 lines

  1. /*
  2.  * @(#)stddef.h, XdLibs, SozobonX
  3.  *
  4.  * standard definitions
  5.  * 
  6.  * you won't have to include this file explicitly, cause it is included by
  7.  * stdlib.h/stdio.h. and via types.h
  8.  * -jerry-
  9.  * last change:
  10.  *  -VS: 1995/08/28
  11.  */
  12.  
  13. #ifndef _STDDEF_H
  14. #define _STDDEF_H
  15.  
  16. #if 0
  17. #define const
  18. #define volatile
  19. #define cdecl
  20. #endif
  21.  
  22. #define    dLibs        (0x1200)
  23.                     /* dLibs identifier (also vsn #) */
  24.  
  25. #define _XDLIBS        0x113
  26.                     /* XDLIBS identifier, there is an
  27.                    variable _xdlibs in library with the same value    */ 
  28. #define    _XDLIBSVERSION "1.13"    
  29.                     /* same as string    */
  30.  
  31. extern    int    _xdlibs;
  32.  
  33. /* 
  34.  *  These
  35.  *  Patchlevel Ident strings are linked
  36.  *  by request of startup code
  37.  */
  38. extern char __Ident_lib[];
  39. extern char __Ident_libx[];
  40.  
  41.         /* void pointer    */
  42. #ifndef    NULL
  43. #define    NULL    (void *)0L
  44. #endif
  45.  
  46. #ifndef    FALSE
  47. #define    FALSE    0
  48. #endif
  49.  
  50. #ifndef TRUE
  51. #define    TRUE    1
  52. #endif
  53.  
  54. #ifndef NIL
  55. #define    NIL    -1
  56. #endif
  57.  
  58.     /* end of string    */
  59. #ifndef EOS
  60. #define    EOS    '\000'
  61. #endif
  62.  
  63. #ifdef    size_t
  64. /* #error "you shouldn't redefine this type 'size_t'" */
  65. #pragma echo you shouldn't redefine this type 'size_t'
  66. #else
  67. # ifdef __SIZE_T_LONG__
  68. typedef    unsigned long    size_t;        /* sizeof() value type */
  69. # else
  70. typedef    unsigned int    size_t;        /* sizeof() value type */
  71. # endif /* SIZE_T_LONG */
  72. #endif /* size_t */
  73.  
  74. #ifdef    ptrdiff_t
  75. #pragma echo you shouldn't redefine this type 'ptrdiff_t'
  76. #else
  77. typedef    long        ptrdiff_t;    /* pointer subtraction result type */
  78. #endif /* prtdiff_t */
  79.  
  80. #ifdef wchar_t
  81. #pragma echo you shouldn't redefine this type 'wchar_t'
  82. #else
  83. typedef char        wchar_t;
  84. #endif
  85.  
  86. /* offset in bytes of 'membr' in structure 'Typ' */
  87. #define offsetof(T,m) \
  88.     ((size_t) (((char *) &(((T *) 256)->m)) - ((char *) ((T *) 256))))
  89.  /* #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) */
  90.  
  91. #endif     /* _STDDEF_H */
  92.